<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<c:set var="ctx" value="${pageContext.request.contextPath }"></c:set>
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<title>找回密码</title>
<link href="${ctx}/css/framework/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="${ctx }/css/index.css">
<%-- <script type="text/javascript" src="${ctx }/js/findPwd.js"></script> --%>
</head>

<body>

	<c:import url="nav.jsp"></c:import>
	<!-- 重置密码 -->
	<div class="container">
		<ol class="breadcrumb">
			<li><a class="returnBack" href="${ctx }/toHome">&lt;
					回到首页</a></li>
			<li class="active">重置密码</li>
		</ol>

		<div class="row grey">
			<div class="col-md-6 col-md-offset-3 ">
				<div class="row">
					<div class="col-md-6 col-md-offset-3 ">
						<img src="${ctx}/images/index/login_logo.png"
							class="img-responsive img-rounded" alt="Responsive image">
					</div>
				</div>
				<div class="row u_login">
					<form class="form-horizontal" role="form">
						<div class="form-group">
							<label for="firstname" class="col-sm-2 control-label">账号</label>
							<div class="col-sm-8">
								<input type="text" class="form-control" id="log_email"
									name="mail" placeholder="请输入你的邮箱" value="" />
							</div>
							<div class="col-sm-2"></div>
						</div>
						<div class="form-group">
							<div class="col-sm-offset-2 col-sm-8">
								<button type="submit" class="btn btn-primary btn-block">确定</button>
							</div>
						</div>

						<div class="form-group">
							<div class="col-sm-offset-2 col-sm-4">
								<a href="${ctx }/register.html">返回注册?</a>
							</div>
						</div>
					</form>
				</div>
			</div>
		</div>

		<div id="result"></div>
	</div>
	<c:import url="footer.jsp"></c:import>
	<script src="${ctx }/js/jquery.min.js"></script>


	<script type="text/javascript">
		$(document).ready(function() {
			var findurl = "sendFindMail";

			$("button").click(function() {
				$.ajax({
					async:false,
					url : findurl,
					data : {
						email : $("#log_email").val()
					},
					success : function(result) {
						if (data.state == 200) {
			            	window.location.href = "/xqyq/index.html";
			            } else {
			                alert(data.comment);
			            }
					}
				});

				/* $.get("index", function(data, status) {
					alert("Data: " + data + "nStatus: " + status);
				}); */
			});
		});
	</script>
</body>

</html>